import { getAction, deleteAction, putAction, postAction, downFilePost } from '@/api/manage'

const serviceName = '/alarm-server'
//分页查询告警消息列表
const getPageList = (params) => getAction(`${serviceName}/alarmCenterMessage/getPageList`, params)
//获取告警的明细数据
const getAlarmMessageItem = (params) => getAction(`${serviceName}/alarmCenterMessage/getItem`, params)
//批量修改告警消息状态
const batchStatus = (params) => putAction(`${serviceName}/alarmCenterMessage/batchStatus`, params)

//查询告警配置configKey
const getConfigKey = (params) => getAction(`${serviceName}/alarmCenterConfig/getConfigKey`, params)
//获取配置明细数据
const getAlarmItem = (params) => getAction(`${serviceName}/alarmCenterConfig/getItem`, params)
//创建告警配置
const alarmCreate = (params) => postAction(`${serviceName}/alarmCenterConfig/create`, params)
//修改告警配置
const alarmUpdate = (params) => putAction(`${serviceName}/alarmCenterConfig/update`, params)
//获取处置详情
const getAlramDisposal = (params) => getAction(`${serviceName}/alarmCenterMessage/getAlramDisposal`, params)
//告警消息列表导出
const exportXls = (params) => downFilePost(`${serviceName}/alarmCenterMessage/exportXls`, params)


export {
  getPageList,
  getAlarmMessageItem,
  batchStatus,
  getConfigKey,
  getAlarmItem,
  alarmCreate,
  alarmUpdate,
  getAlramDisposal,
  exportXls
}
